/**
 */
package org.xtext.mydsl.scheduler.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.xtext.mydsl.scheduler.InfoEspacio;
import org.xtext.mydsl.scheduler.SchedulerPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Info Espacio</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.xtext.mydsl.scheduler.impl.InfoEspacioImpl#getCant <em>Cant</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class InfoEspacioImpl extends MinimalEObjectImpl.Container implements InfoEspacio
{
  /**
   * The default value of the '{@link #getCant() <em>Cant</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getCant()
   * @generated
   * @ordered
   */
  protected static final int CANT_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getCant() <em>Cant</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getCant()
   * @generated
   * @ordered
   */
  protected int cant = CANT_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected InfoEspacioImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return SchedulerPackage.Literals.INFO_ESPACIO;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getCant()
  {
    return cant;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setCant(int newCant)
  {
    int oldCant = cant;
    cant = newCant;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, SchedulerPackage.INFO_ESPACIO__CANT, oldCant, cant));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case SchedulerPackage.INFO_ESPACIO__CANT:
        return getCant();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case SchedulerPackage.INFO_ESPACIO__CANT:
        setCant((Integer)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case SchedulerPackage.INFO_ESPACIO__CANT:
        setCant(CANT_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case SchedulerPackage.INFO_ESPACIO__CANT:
        return cant != CANT_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (cant: ");
    result.append(cant);
    result.append(')');
    return result.toString();
  }

} //InfoEspacioImpl
